public class TuneAdClient extends Object
Constructor and Description |
---|
TuneAdClient() |
Modifier and Type | Method and Description |
---|---|
static void |
init(String advertiserId)
Initialize the client for making network calls
|
static void |
logClick(TuneAdView adView,
JSONObject adParams) |
static void |
logClose(TuneAdView adView,
JSONObject adParams) |
static void |
logView(TuneAdView adView,
JSONObject adParams) |
static String |
requestAd(String url,
JSONObject adParams) |
static String |
requestAdOfType(String type,
TuneAdParams adParams) |
static String |
requestBannerAd(TuneAdParams adParams) |
static String |
requestInterstitialAd(TuneAdParams adParams) |
static String |
requestNativeAd(TuneAdParams adParams) |
static void |
setAddress(String address) |
static void |
setStaging(boolean staging) |
public static void init(String advertiserId)
advertiserId
- TUNE advertiser IDpublic static void setStaging(boolean staging)
public static void setAddress(String address)
public static String requestBannerAd(TuneAdParams adParams) throws com.tune.crosspromo.TuneBadRequestException, com.tune.crosspromo.TuneServerErrorException, ConnectException
com.tune.crosspromo.TuneBadRequestException
com.tune.crosspromo.TuneServerErrorException
ConnectException
public static String requestInterstitialAd(TuneAdParams adParams) throws com.tune.crosspromo.TuneBadRequestException, com.tune.crosspromo.TuneServerErrorException, ConnectException
com.tune.crosspromo.TuneBadRequestException
com.tune.crosspromo.TuneServerErrorException
ConnectException
public static String requestNativeAd(TuneAdParams adParams) throws com.tune.crosspromo.TuneBadRequestException, com.tune.crosspromo.TuneServerErrorException, ConnectException
com.tune.crosspromo.TuneBadRequestException
com.tune.crosspromo.TuneServerErrorException
ConnectException
public static String requestAdOfType(String type, TuneAdParams adParams) throws com.tune.crosspromo.TuneBadRequestException, com.tune.crosspromo.TuneServerErrorException, ConnectException
com.tune.crosspromo.TuneBadRequestException
com.tune.crosspromo.TuneServerErrorException
ConnectException
public static void logView(TuneAdView adView, JSONObject adParams)
public static void logClick(TuneAdView adView, JSONObject adParams)
public static void logClose(TuneAdView adView, JSONObject adParams)
public static String requestAd(String url, JSONObject adParams) throws com.tune.crosspromo.TuneBadRequestException, com.tune.crosspromo.TuneServerErrorException, ConnectException
com.tune.crosspromo.TuneBadRequestException
com.tune.crosspromo.TuneServerErrorException
ConnectException